#ifndef DDS_TOPIC_SUBSCRIBE_H
#define DDS_TOPIC_SUBSCRIBE_H

#include <string>
typedef struct dds_sequence_uint8
{
    uint32_t _maximum;
    uint32_t _length;
    uint8_t *_buffer;
    bool _release;
} dds_sequence_uint8;

typedef struct DDSData_Msg
{
    char *topic;
    double timestamp;
    dds_sequence_uint8 payload;
} DDSData_Msg;

#define DDSData_Msg__alloc() \
    ((DDSData_Msg *)dds_alloc(sizeof(DDSData_Msg)));

#define DDSData_Msg_free(d, o) \
    dds_sample_free((d), &DDSData_Msg_desc, (o))

namespace DcAdr
{
    class DDSTopicSubScribe
    {
    public:
        DDSTopicSubScribe();
        ~DDSTopicSubScribe();
        int init(const std::string &topicStr);
    };
}
#endif // DDS_TOPIC_SUBSCRIBE_H